// Created from GenerationTemplate
// For Decisions HL7 Engine
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Reflection;
using DecisionsFramework.Design.Properties;
using Decisions.HL7.Generated.AbstractMessage;
using Decisions.HL7.DataTypes;
using ST = System.String;
using SI = System.String;
using TX = System.String;
using FT = System.String;
using IS = System.String;
using ID = System.String;
using SNM = System.String;

namespace Decisions.HL7.Message
{
    [DataContract]
	public class MSH : AbstractSegment
    {

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("1 Field Separator",1)]
  	    [HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.True,"ST")]
	    public ST FieldSeparator {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("2 Encoding Characters",2)]
  	    [HL7Field(HL7Version.v23, 2, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v231, 2, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v24, 2, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v25, 2, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v251, 2, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v26, 2, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v27, 2, HL7Repeat.False, HL7Required.True,"ST")]
	    public ST EncodingCharacters {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("3 Sending Application",3)]
  	    [HL7Field(HL7Version.v23, 3, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v231, 3, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v24, 3, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v25, 3, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v251, 3, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v26, 3, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v27, 3, HL7Repeat.False, HL7Required.True,"HD")]
		[Application]
	    public HD SendingApplication {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("4 Sending Facility",4)]
  	    [HL7Field(HL7Version.v23, 4, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v231, 4, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v24, 4, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v25, 4, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v251, 4, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v26, 4, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v27, 4, HL7Repeat.False, HL7Required.True,"HD")]
		[Facility]
	    public HD SendingFacility {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("5 Receiving Application",5)]
  	    [HL7Field(HL7Version.v23, 5, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v231, 5, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v24, 5, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v25, 5, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v251, 5, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v26, 5, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v27, 5, HL7Repeat.False, HL7Required.True,"HD")]
		[Application]
	    public HD ReceivingApplication {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("6 Receiving Facility",6)]
  	    [HL7Field(HL7Version.v23, 6, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v231, 6, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v24, 6, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v25, 6, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v251, 6, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v26, 6, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v27, 6, HL7Repeat.False, HL7Required.True,"HD")]
		[Facility]
	    public HD ReceivingFacility {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("7 Date/Time of Message",7)]
  	    [HL7Field(HL7Version.v23, 7, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 7, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 7, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 7, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 7, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 7, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 7, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM DateTimeofMessage {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("8 Security",8)]
  	    [HL7Field(HL7Version.v23, 8, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v231, 8, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v24, 8, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v25, 8, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v251, 8, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v26, 8, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v27, 8, HL7Repeat.False, HL7Required.True,"ST")]
	    public ST Security {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("9 Message Type",9)]
  	    [HL7Field(HL7Version.v23, 9, HL7Repeat.False, HL7Required.True,"CM_MSG")]
  	    [HL7Field(HL7Version.v231, 9, HL7Repeat.False, HL7Required.True,"MSG")]
  	    [HL7Field(HL7Version.v24, 9, HL7Repeat.False, HL7Required.True,"MSG")]
  	    [HL7Field(HL7Version.v25, 9, HL7Repeat.False, HL7Required.True,"MSG")]
  	    [HL7Field(HL7Version.v251, 9, HL7Repeat.False, HL7Required.True,"MSG")]
  	    [HL7Field(HL7Version.v26, 9, HL7Repeat.False, HL7Required.True,"MSG")]
  	    [HL7Field(HL7Version.v27, 9, HL7Repeat.False, HL7Required.True,"MSG")]
	    public MSG MessageType {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("10 Message Control ID",10)]
  	    [HL7Field(HL7Version.v23, 10, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v231, 10, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v24, 10, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v25, 10, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v251, 10, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v26, 10, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v27, 10, HL7Repeat.False, HL7Required.True,"ST")]
	    public ST MessageControlID {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("11 Processing ID",11)]
  	    [HL7Field(HL7Version.v23, 11, HL7Repeat.False, HL7Required.True,"PT")]
  	    [HL7Field(HL7Version.v231, 11, HL7Repeat.False, HL7Required.True,"PT")]
  	    [HL7Field(HL7Version.v24, 11, HL7Repeat.False, HL7Required.True,"PT")]
  	    [HL7Field(HL7Version.v25, 11, HL7Repeat.False, HL7Required.True,"PT")]
  	    [HL7Field(HL7Version.v251, 11, HL7Repeat.False, HL7Required.True,"PT")]
  	    [HL7Field(HL7Version.v26, 11, HL7Repeat.False, HL7Required.True,"PT")]
  	    [HL7Field(HL7Version.v27, 11, HL7Repeat.False, HL7Required.True,"PT")]
	    public PT ProcessingID {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("12 Version ID",12)]
  	    [HL7Field(HL7Version.v23, 12, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 12, HL7Repeat.False, HL7Required.True,"VID")]
  	    [HL7Field(HL7Version.v24, 12, HL7Repeat.False, HL7Required.True,"VID")]
  	    [HL7Field(HL7Version.v25, 12, HL7Repeat.False, HL7Required.True,"VID")]
  	    [HL7Field(HL7Version.v251, 12, HL7Repeat.False, HL7Required.True,"VID")]
  	    [HL7Field(HL7Version.v26, 12, HL7Repeat.False, HL7Required.True,"VID")]
  	    [HL7Field(HL7Version.v27, 12, HL7Repeat.False, HL7Required.True,"VID")]
	    public VID VersionID {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("13 Sequence Number",13)]
  	    [HL7Field(HL7Version.v23, 13, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 13, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 13, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 13, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 13, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 13, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 13, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM SequenceNumber {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("14 Continuation Pointer",14)]
  	    [HL7Field(HL7Version.v23, 14, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v231, 14, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v24, 14, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v25, 14, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v251, 14, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v26, 14, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v27, 14, HL7Repeat.False, HL7Required.True,"ST")]
	    public ST ContinuationPointer {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("15 Accept Acknowledgement Type",15)]
  	    [HL7Field(HL7Version.v23, 15, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 15, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 15, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 15, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 15, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 15, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 15, HL7Repeat.False, HL7Required.True,"ID")]
		[AcceptApplicationAcknowledgmentConditions]
	    public ID AcceptAcknowledgementType {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("16 Application Acknowledgement Type",16)]
  	    [HL7Field(HL7Version.v23, 16, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 16, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 16, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 16, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 16, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 16, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 16, HL7Repeat.False, HL7Required.True,"ID")]
		[AcceptApplicationAcknowledgmentConditions]
	    public ID ApplicationAcknowledgementType {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("17 Country Code",17)]
  	    [HL7Field(HL7Version.v23, 17, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 17, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 17, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 17, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 17, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 17, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 17, HL7Repeat.False, HL7Required.True,"ID")]
		[Countrycode]
	    public ID CountryCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("18 Character Set",18)]
  	    [HL7Field(HL7Version.v23, 18, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 18, HL7Repeat.True, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 18, HL7Repeat.True, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 18, HL7Repeat.True, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 18, HL7Repeat.True, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 18, HL7Repeat.True, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 18, HL7Repeat.True, HL7Required.True,"ID")]
		[AlternateCharacterSets]
	    public ID[] CharacterSet {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("19 Principal Language Of Message",19)]
  	    [HL7Field(HL7Version.v23, 19, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 19, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 19, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 19, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 19, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 19, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 19, HL7Repeat.False, HL7Required.True,"CWE")]
	    public CWE PrincipalLanguageOfMessage {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("20 Alternate Character Set Handling Scheme",20)]
  	    [HL7Field(HL7Version.v231, 20, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 20, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 20, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 20, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 20, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 20, HL7Repeat.False, HL7Required.True,"ID")]
		[AlternateCharacterSetHandlingScheme]
	    public ID AlternateCharacterSetHandlingScheme {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("21 Conformance Statement ID",21)]
  	    [HL7Field(HL7Version.v24, 21, HL7Repeat.True, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 21, HL7Repeat.True, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v251, 21, HL7Repeat.True, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v26, 21, HL7Repeat.True, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v27, 21, HL7Repeat.True, HL7Required.True,"EI")]
	    public EI[] ConformanceStatementID {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("22 Sending Responsible Organization",22)]
  	    [HL7Field(HL7Version.v26, 22, HL7Repeat.False, HL7Required.True,"XON")]
  	    [HL7Field(HL7Version.v27, 22, HL7Repeat.False, HL7Required.True,"XON")]
	    public XON SendingResponsibleOrganization {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("23 Receiving Responsible Organization",23)]
  	    [HL7Field(HL7Version.v26, 23, HL7Repeat.False, HL7Required.True,"XON")]
  	    [HL7Field(HL7Version.v27, 23, HL7Repeat.False, HL7Required.True,"XON")]
	    public XON ReceivingResponsibleOrganization {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("24 Sending Network Address",24)]
  	    [HL7Field(HL7Version.v26, 24, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v27, 24, HL7Repeat.False, HL7Required.True,"HD")]
	    public HD SendingNetworkAddress {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("25 Receiving Network Address",25)]
  	    [HL7Field(HL7Version.v26, 25, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v27, 25, HL7Repeat.False, HL7Required.True,"HD")]
	    public HD ReceivingNetworkAddress {get;set;}


	    [DataMember]
        [PropertyClassification("AdditionalValue1", 26)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue1 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue2", 27)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue2 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue3", 28)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue3 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue4", 29)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue4 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue5", 30)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue5 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue6", 31)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue6 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue7", 32)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue7 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue8", 33)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue8 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue9", 34)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue9 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue10", 35)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue10 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue11", 36)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue11 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue12", 37)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue12 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue13", 38)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue13 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue14", 39)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue14 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue15", 40)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue15 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue16", 41)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue16 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue17", 42)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue17 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue18", 43)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue18 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue19", 44)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue19 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue20", 45)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue20 { get; set; }

	

		internal override void ConsumeTextSegment(string segmentTextData, HL7ParserOptions options)
		{
			string[] segmentTextParts = segmentTextData.Split(new char[] { options.FieldSep }, StringSplitOptions.None);
			// Don't write FieldSep because it comes from parser options
            FieldSeparator = options.FieldSep + string.Empty;
			EncodingCharacters = (ST)ParseTextAtPositionIntoData(segmentTextParts, 1, options, typeof(ST), "MSH.2");
			SendingApplication = (HD)ParseTextAtPositionIntoData(segmentTextParts, 2, options, typeof(HD), "MSH.3");
			SendingFacility = (HD)ParseTextAtPositionIntoData(segmentTextParts, 3, options, typeof(HD), "MSH.4");
			ReceivingApplication = (HD)ParseTextAtPositionIntoData(segmentTextParts, 4, options, typeof(HD), "MSH.5");
			ReceivingFacility = (HD)ParseTextAtPositionIntoData(segmentTextParts, 5, options, typeof(HD), "MSH.6");
			DateTimeofMessage = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 6, options, typeof(DTM), "MSH.7");
			Security = (ST)ParseTextAtPositionIntoData(segmentTextParts, 7, options, typeof(ST), "MSH.8");
			MessageType = (MSG)ParseTextAtPositionIntoData(segmentTextParts, 8, options, typeof(MSG), "MSH.9");
			MessageControlID = (ST)ParseTextAtPositionIntoData(segmentTextParts, 9, options, typeof(ST), "MSH.10");
			ProcessingID = (PT)ParseTextAtPositionIntoData(segmentTextParts, 10, options, typeof(PT), "MSH.11");
			VersionID = (VID)ParseTextAtPositionIntoData(segmentTextParts, 11, options, typeof(VID), "MSH.12");
			SequenceNumber = (NM)ParseTextAtPositionIntoData(segmentTextParts, 12, options, typeof(NM), "MSH.13");
			ContinuationPointer = (ST)ParseTextAtPositionIntoData(segmentTextParts, 13, options, typeof(ST), "MSH.14");
			AcceptAcknowledgementType = (ID)ParseTextAtPositionIntoData(segmentTextParts, 14, options, typeof(ID), "MSH.15");
			ApplicationAcknowledgementType = (ID)ParseTextAtPositionIntoData(segmentTextParts, 15, options, typeof(ID), "MSH.16");
			CountryCode = (ID)ParseTextAtPositionIntoData(segmentTextParts, 16, options, typeof(ID), "MSH.17");
	    	CharacterSet = (ID[])ParseTextAtPositionIntoDataArray<ID>(segmentTextParts, 17, options, "MSH.18");
			PrincipalLanguageOfMessage = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 18, options, typeof(CWE), "MSH.19");
			AlternateCharacterSetHandlingScheme = (ID)ParseTextAtPositionIntoData(segmentTextParts, 19, options, typeof(ID), "MSH.20");
	    	ConformanceStatementID = (EI[])ParseTextAtPositionIntoDataArray<EI>(segmentTextParts, 20, options, "MSH.21");
			SendingResponsibleOrganization = (XON)ParseTextAtPositionIntoData(segmentTextParts, 21, options, typeof(XON), "MSH.22");
			ReceivingResponsibleOrganization = (XON)ParseTextAtPositionIntoData(segmentTextParts, 22, options, typeof(XON), "MSH.23");
			SendingNetworkAddress = (HD)ParseTextAtPositionIntoData(segmentTextParts, 23, options, typeof(HD), "MSH.24");
			ReceivingNetworkAddress = (HD)ParseTextAtPositionIntoData(segmentTextParts, 24, options, typeof(HD), "MSH.25");
		}

		public string GetER7(HL7ParserOptions options) {
			List<string> segmentParts = new List<string>();
			segmentParts.Add(string.Format("MSH{0}{1}", FieldSeparator, EncodingCharacters));
			segmentParts.Add(GetER7TextForSegmentPart(SendingApplication, options));
			segmentParts.Add(GetER7TextForSegmentPart(SendingFacility, options));
			segmentParts.Add(GetER7TextForSegmentPart(ReceivingApplication, options));
			segmentParts.Add(GetER7TextForSegmentPart(ReceivingFacility, options));
			segmentParts.Add(GetER7TextForSegmentPart(DateTimeofMessage, options));
		    segmentParts.Add(Security);
			segmentParts.Add(GetER7TextForSegmentPart(MessageType, options));
		    segmentParts.Add(MessageControlID);
			segmentParts.Add(GetER7TextForSegmentPart(ProcessingID, options));
			segmentParts.Add(GetER7TextForSegmentPart(VersionID, options));
			segmentParts.Add(GetER7TextForSegmentPart(SequenceNumber, options));
		    segmentParts.Add(ContinuationPointer);
		    segmentParts.Add(AcceptAcknowledgementType);
		    segmentParts.Add(ApplicationAcknowledgementType);
		    segmentParts.Add(CountryCode);
		    segmentParts.Add(ConvertStringArray(CharacterSet, options));
			segmentParts.Add(GetER7TextForSegmentPart(PrincipalLanguageOfMessage, options));
		    segmentParts.Add(AlternateCharacterSetHandlingScheme);
		    segmentParts.Add(GetER7TextForSegmentArrayPart(ConformanceStatementID, options));
			segmentParts.Add(GetER7TextForSegmentPart(SendingResponsibleOrganization, options));
			segmentParts.Add(GetER7TextForSegmentPart(ReceivingResponsibleOrganization, options));
			segmentParts.Add(GetER7TextForSegmentPart(SendingNetworkAddress, options));
			segmentParts.Add(GetER7TextForSegmentPart(ReceivingNetworkAddress, options));
			return string.Join("" + options.FieldSep, segmentParts.ToArray());
		}

    }
}

